home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / p_pascal.zip / SAMPLES / RECRSVIO.PAS < prev    next >
Pascal/Delphi Source File  |  1990-01-28  |  922b  |  38 lines

  1. (*$c+*)
  2. program test(input,output);
  3. var i,j,x,y : integer;
  4.     w : real;
  5. function tester(a, b, c : integer) : integer;
  6. begin
  7.     write(': a = ', a : 3, ' : ');
  8.     write('b = ', b : 3, ' : ');
  9.     write('c = ', c : 3, ' :');
  10.     write(': a + b + c ==> ');
  11.     tester := a + b + c
  12. end;
  13. begin
  14.     if system('cls') = 0 then ;
  15.     write('type integer x: '); readln(x);
  16.     write('type integer y: '); readln(y);
  17.     write('type in real w: '); readln(w);
  18.     if system('cls') = 0 then ;
  19. for i := 0 to 5 do
  20.   begin
  21.     x := x - i; y := y - i;
  22.     w := w - i; j := trunc(w);
  23.     writeln('Real number w = ', w : 5 : 5, '.');
  24.     {SPECIFIERS OF THE FORM 
  25.         "w : total_width : precision"
  26.      AND
  27.         "w : total_width"
  28.      WORK ON THIS SYSTEM.}
  29.     writeln;
  30.     writeln('tester{w,y,x} :', tester(j, y, x) : 5);
  31.     writeln;
  32.     writeln('tester{y,x,w} :', tester(y, x, j) : 5);
  33.     writeln;
  34.     writeln('tester{x,w,y} :', tester(x, j, y) : 5);
  35.     writeln
  36.   end
  37. end.
  38.